package routers

import (
	"day12_10_homework/conterlles"
	"day12_10_homework/middle"
	"github.com/gin-gonic/gin"
)

func SetVideoRouters(c *gin.Engine) {
	//路由组+中间件
	serves := c.Group("/video").Use(middle.AuthMiddle())
	{
		serves.POST("/create", conterlles.CreateVideo)
		serves.GET("/list", conterlles.ListVideo)
		serves.POST("/delete", conterlles.DeleteVideo)
		serves.POST("/update", conterlles.UpdateVideo)
	}
}
